# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Mitch Bigelow <ipha00@gmail.com>

pkgname=pixiewps
pkgver=1.4.2
pkgrel=3
pkgdesc='Offline bruteforce of the WPS pin exploiting the low or non-existing entropy of some APs'
url='https://github.com/wiire/pixiewps'
arch=('loong64' 'x86_64')
license=('GPL3')
depends=('glibc' 'openssl')
optdepends=('reaver: authentication session key support'
            'bully: authentication session key support')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/wiire-a/pixiewps/archive/v${pkgver}.tar.gz)
sha512sums=('e64b29b0ab46a768d7e76904b8be61a6c050ccd97da47dc43406a0247b728a521f88f10c8b3bdddfa87dca30955337782c91b3c128a578cbefdcceba811ad64f')

build() {
  cd ${pkgname}-${pkgver}
  make OPENSSL=1 CFLAGS="${CFLAGS}"
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" PREFIX=/usr install
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 pixiewps.1 -t "${pkgdir}/usr/share/man/man1"
}

# vim: ts=2 sw=2 et:
